function Debug()
{
	this.className = 'Debug';

	var obj = this;

	window.addEventListener('load', function(){
		obj.debugElement = document.getElementById('debug');
	});

	this.add = function(s)
	{
		this.debugElement.innerHTML = '<span class="bullet">&bull;</span> <span class="debug-info">'+s+'</span><br />'+this.debugElement.innerHTML;
	}

	this.warning = function(s)
	{
		this.debugElement.innerHTML = '<span class="bullet">&bull;</span> <span class="debug-warning">'+s+'</span><br />'+this.debugElement.innerHTML;
	}

	this.error = function(s)
	{
		this.debugElement.innerHTML = '<span class="bullet">&bull;</span> <span class="debug-error">'+s+'</span><br />'+this.debugElement.innerHTML;
	}
}

debug = new Debug();
